package com.passion.task.timer;

import com.passion.service.OfflineAnalysisTemplateSqlTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @program offline-e-commerce-data-warehouse
 * @Description 定时任务每天凌晨1点将分析sql执行并将结果写入结果表和redis中
 * @Author limeihua
 * @Date 2024/09/28 19:44
 * @Version 1.0
 */
@Component
public class ScheduledOfflineTask {
    @Autowired
    private OfflineAnalysisTemplateSqlTableService service;
    @Scheduled(cron = "0 00 01 * * ?")
    public void OfflineAnalysisEveryday() {
        service.executeEverydayAnalysis();
    }
}
